package Package.PropertiesCollection.Properties_Map;

import java.util.Objects;
import java.util.Properties;
import java.util.Set;

public class Properties_Map {
//    Properties介绍
//是一个Map体系的集合类
//Properties可以保存到流中或从流中加载
//属性列表中的每个键及其对应的值都是一个字符串
    public static final void Properties_Map(){
        Properties prop=new Properties();
        prop.put("100001","李白");
        prop.put("100002","苏轼");
        prop.put("100003","杜甫");
//        遍历
        Set<Object> keyset=prop.keySet();
        for (Object obj:keyset
             ) {
            System.out.println(prop.get(obj));
        }
    }
}
